<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
       var a, b,c;
        do{
           c = +prompt('欢迎使用简易计算器\n1.加法运算\n2，减法运算\n3.乘法运算\n4.除法运算\n5.退出')
           if (c ===5 ) {
               break
           }
           a = +prompt('请输入第一个数')
           b = +prompt('请输入第二个数')
           {
            if (c === 1) {
            
                alert(a + b)
            }else if (c ===2) {
            
                alert(a - b)
            }else if (c ===3) {
            
                alert(a * b)
            }else if (c ===4) {
            
                alert(a / b)
            }
            
        }
          
        }while( c !== 5  )
    </script>
</body>
</html>